<!-- include tpl=header menutitle=$page_rs.title -->
<section class="bg-light p-5"{if $cate_rs.banner || $page_rs.banner} style="background:url('{$cate_rs.banner ? $cate_rs.banner.filename : $page_rs.banner.filename}') center center no-repeat;background-size:cover;"{/if}>
	<h1 class="p-4 text-center">{$cate_rs ? $cate_rs.title : $page_rs.title}</h1>
	<!-- php:$taglist = $cate_rs.tag ? $cate_rs.tag : $page_rs.tag -->
	<!-- if $taglist -->
	<div class="container">
		<div class="text-center m-3">
			<span class="p-2 bg-light-50 rounded-lg">
			标签：
			<!-- loop from=$taglist key=$k value=$v id=$idxx -->
			{$v.html}<!-- if $idxx.total != $idxx.num -->，<!-- /if -->
			<!-- /loop -->
			</span>
		</div>
	</div>
	<!-- /if -->
</section>
<section class="container"><div class="mt-3"><!-- include tpl=block/breadcrumb --></div></section>

<!-- include file=bbs_list.php -->
<section class="container">
	<!-- if !$rslist -->
	<div class="m-4 p-4 text-center">暂无主题</div>
	<!-- else -->
	
	<table class="table">
		<thead>
			<tr>
				<th>论坛主题</th>
				<th>发帖人</th>
				<th>点击数</th>
				<th>时间</th>
			</tr>
		</thead>
		<tbody>
			<!-- loop from=$rslist key=$key value=$value -->
			<tr>
				<td><a href="{$value.url}"> <em class="fa {$value._icon}"></em> {$value.title}</a></td>
				<td>{$value._author}</td>
				<td>{$value.hits}</td>
				<td>{$value._lastdate}</td>
			</tr>
			<!-- /loop -->
		</tbody>
	</table>
	<!-- /if -->
	<div class="row">
		<div class="col">
			<!-- if $session.user_id -->
			<a class="btn btn-primary" href="{url ctrl=post id=$page_rs.identifier cateid=$cate_rs.id/}">发布新主题</a>
			<!-- else -->
			<a class="btn btn-danger"  href="{url ctrl=login _back=$cate_rs.url/}" class="red">仅限会员才有发布权限</a>
			<!-- /if -->
		</div>
		<div class="col"><!-- include tpl=block/pagelist --></div>
	</div>
	
</section>

<!-- include tpl=footer -->